<!--{include(file='head.html')}-->
<script type="text/javascript" src="template/jslib/upload/ajaxupload.js"></script>
<div id="wrap">
	<!--{include('left.html')}-->
	<div id="maincont">
		<b class="b1"></b><b class="b2"></b><b class="b3"></b><b class="b4"></b>
		<form action="<!--{url('admin','link','linksave')}-->" method="post" name="submitform" id="submitform">
		<div id="main_c">
		<!--{if $opertype == "edit"}-->
			<ul class="bk">
				<li>
					<label><em>*</em>友链名称：</label>
					<p>
						<input class="input_tx" value="<!--{$link.linkname}-->" name="linkname" id="linkname" type="text"/>
					</p>
				</li>
				<li>
					<label><em>*</em>友链网址：</label>
					<p>
						<input class="input_tx" value="<!--{$link.linkurl}-->" name="linkurl"  id="linkurl" type="text"/>
					</p>
				</li>
				<li id="forurl">
					<label>友链图片：</label>
					<p>
						<div id="buttonholder"></div>
						<input type="hidden" value="<!--{$link.linkpic}-->" name="pic" id="pic"/>
						<span id="uploadpic">
							<!--{if $link.linkpic}-->
								<img src="<!--{$link.linkpic}-->" />
							<!--{/if}-->
						</span>
					</p>
				</li>
			</ul>
		<!--{elseif $opertype=="add"}-->
			<ul class="bk">
				<li>
					<label><em>*</em>友链名称：</label>
					<p>
						<input class="input_tx" value="" name="linkname" id="linkname" type="text"/>
					</p>
				</li>
				<li>
					<label><em>*</em>友链网址：</label>
					<p>
						<input class="input_tx" value="http://" name="linkurl" id="linkurl" type="text"/>
					</p>
				</li>
				<li id="forurl">
					<label>友链图片：</label>
					<p>
						<div id="buttonholder"></div>
						<input type="hidden" value="" name="pic" id="pic"/>
						<span id="uploadpic"></span>
					</p>
				</li>
			</ul>
		<!--{/if}-->
			<div class="bt_bk2">
				<input type="hidden" value="<!--{$opertype}-->" name="opertype" />
				<input type="hidden" value="<!--{def($linkid)}-->" name="linkid" />
				<a href="javascript:void(0);" class="btn" onclick="jssubmit('link');return false;"><span>保存</span></a>
			</div>
		</div>
		</form>
		<b class="b4b"></b><b class="b3b"></b><b class="b2b"></b><b class="b1b"></b>
	</div>
</div>
<!--{include(file='foot.html')}-->
<script type="text/javascript">
$(function(){
	var uploader = new qq.FileUploader({action:"<!--{url('admin','uploadfile','pic')}-->"});
});
</script>